import { useParams, useNavigate } from 'react-router-dom'

export default function UserDetail() {
  const params = useParams()
  const navigate = useNavigate()
  return (
    <div>
      <button type="button" className="btn btn-light btn-sm" onClick={() => navigate(-1)}>
        后退
      </button>
      <h4 className="text-center">用户详情 --- {params.id}</h4>
    </div>
  )
}
